<template>
	<view class="hotel-index-page place">
		<view class="box">
			<view class="tv1">
				<view class="tv2">中央公园</view>
				<view class="space"></view>
				<view class="tv3">
					<image class="tv4 place"></image>
					<view class="tv5">我的位置</view>
				</view>
			</view>
			<view class="tv6" @click="goDate">
				<view>
					<view class="tv7">今日入住</view>
					<view class="tv8">5月28日</view>
				</view>
				<view class="tv9">1晚</view>
				<view>
					<view class="tv7">明日离店</view>
					<view class="tv8">5月29日</view>
				</view>
			</view>
			<view class="cell">
				<view>酒店名/地名/关键词</view>
				<view class="arrow place"></view>
			</view>
			<view class="cell" @click="showPopup = true">
				<view>设置星级价格</view>
				<view class="arrow place"></view>
			</view>
			<view class="search-btn" @click="onSubmit">查询</view>
		</view>
		
		<view class="overlay" v-show="showPopup">
		
		<view class="popup">
			<view class="label">星级</view>
			<view class="tags">
				<view class="tag active">经济型</view>
				<view class="tag">三星舒适</view>
				<view class="tag">四星高档</view>
				<view class="tag">五星豪华</view>
			</view>
			<view class="label">价格</view>
			<view class="tags wrap">
				<view class="tag active">￥0-200</view>
				<view class="tag">￥200-300</view>
				<view class="tag">￥300-500</view>
				<view class="tag">￥500-600</view>
				<view class="tag">￥600-1000</view>
				<view class="tag">￥1000以上</view>
			</view>
			<view class="actions">
				<view class="cancel" @click="showPopup = false;">取消</view>
				<view class="confirm">确定</view>
			</view>
		</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				showPopup: false
			};
		},
		methods: {
			goDate(){
				uni.navigateTo({
					url: '/pages/2_development/hotel/select-date'
				})
			},
			onSubmit(){
				uni.navigateTo({
					url: '/pages/2_development/hotel/list'
				})
			}
		}
	}
</script>

<style lang="scss">
	@import './style.scss';
	
.hotel-index-page{
	width: 100vw;
	height: 100vh;
	padding-top: 27px;
	.box{
		margin: 0 15px;
		height: 452px;
		border-radius: 27px;
		background: #fff;
		box-shadow: 0 0 9px rgba(0, 0, 0, 0.16);
		padding-left: 25px;
		padding-right: 20px;
		padding-top: 30px;
		
		
		.space{
			flex: 1;
		}
		
		.tv1{
			display: flex;
			align-items: center;
			padding-bottom: 26px;
			border-bottom: 1px solid #eee;
		}
		.tv2{
			font-weight: bold;
			font-size: 18px;
			line-height: 1;
			color: #333;
		}
		.tv3{
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
		}
		.tv4{
			width: 14px;
			height: 18px;
		}
		.tv5{
			font-size: 13px;
			line-height: 1;
			color: #333;
			margin-top: 7px;
		}
		
		.tv6{
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding-top: 22px;
			padding-bottom: 26px;
			border-bottom: 1px solid #eee;
		}
		.tv7{
			font-size: 13px;
			line-height: 1;
			color: #333;
		}
		.tv8{
			font-weight: bold;
			font-size: 18px;
			line-height: 1;
			color: #333;
			margin-top: 16px;
		}
		.tv9{
			font-size: 22px;
			color: #333;
		}
		
		.cell{
			height: 68px;
			display: flex;
			align-items: center;
			justify-content: space-between;
			border-bottom: 1px solid #eee;
			.arrow{
				width: 15px;
				height: 15px;
			}
		}
		
		
		.search-btn{
			width: 219px;
			height: 39px;
			line-height: 39px;
			text-align: center;
			border-radius: 20px;
			background: #0193ff;
			margin: 48px auto 0;
			font-weight: bold;
			font-size: 16px;
			color: #fff;
		}
	}
}
</style>
